/** 预设的 Event 命令 */
export const createCommandEvent = (params, name, desc) => {
  return { name, desc, command: '$event', params };
};

/** 预设的 Open 命令 */
export const createCommandOpen = (params, name, desc) => {
  return { name, desc, command: '$open', params };
};

/** 预设的 Push 命令 */
export const createCommandPush = (params, name, desc) => {
  return { name, desc, command: '$push', params };
};

/** 预设的 Switch 按钮 */
export const createSettingSwitch = (group, title, name, help) => {
  return {
    group: group,
    title: title,
    dataIndex: name,
    inputNode: 'switch',
    itemProps: { help: help, valuePropName: 'checked' },
  };
};
